package com.yanqu.road.server.cmd.activity.fellingtrees;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.FellingTreesProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.GameProtocol;
import com.yanqu.road.utils.YanQuMessageUtils;

@Cmd(code = CrossProtocol.C2_CROSS_FELLING_TREES_SEE_RANK_EQUIP_RESP, desc = "")
public class CrossFellingTreesSeeRankEquipRespCmd extends CrossCommand {

    private FellingTreesProto.CrossFellingTreesSeeRankEquipRespMsg respMsg;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        respMsg = FellingTreesProto.CrossFellingTreesSeeRankEquipRespMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        FellingTreesProto.FellingTreesSeeRankEquipRespMsg.Builder builder = respMsg.getResp().toBuilder();
        YanQuMessage message = YanQuMessageUtils.buildMessage(ClientProtocol.U_FELLING_TREES_SEE_RANK_EQUIP, builder);
        MessageHelper.sendPacket(respMsg.getReqServerId(), respMsg.getReqUserId(), message);
    }

    @Override
    public void sendData() {

    }
}
